package com.eralink.readerfinderlib;

public final class EraLinkReaderFinderInterface {
    private EraLinkReaderFinderInterface() {
    }

    private static class SingletonClassInstance {
        private static final EraLinkReaderFinderInterface instance = new EraLinkReaderFinderInterface();
    }

    public static EraLinkReaderFinderInterface getInstance() {
        return SingletonClassInstance.instance;
    }

    public int open(short listen_port) {
        return ReaderFinder.getInstance().open(listen_port);
    }

    public int close() {
        return ReaderFinder.getInstance().close();
    }

    public void setDeviceReportCallback(EraLinkReaderReportCallback reportCallback) {
        ReaderFinder.getInstance().setReaderReportCallback(reportCallback);
    }

    public int discovery() {
        return ReaderFinder.getInstance().discovery();
    }

    public int getNetConfig(String mac_address, final String[] net_config) {
        return ReaderFinder.getInstance().getNetConfig(mac_address, net_config);
    }

    public int setNetConfig(String mac_address, String net_config) {
        return ReaderFinder.getInstance().setNetConfig(mac_address, net_config);
    }

    public int restart(String mac_address) {
        return ReaderFinder.getInstance().restart(mac_address);
    }
}
